﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemDoc_codemanage_list.aspx.cs" Inherits="Ccit.OA.SystemDoc.SystemDoc_codemanage_list" %>
<%@ Register TagPrefix="ccit" Namespace="Ccit.ServerControls" Assembly="Ccit.ServerControls.ActionForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>文档管理-编号管理</title>
      <script language="javascript" type="text/javascript" src="../script/jquery.js"></script>
    <script language="javascript" type="text/javascript" src="../script/StringClass_Ext.js"></script>
    <script language="javascript" type="text/javascript" src="../script/jsonlib.js"></script>
    <script language="javascript" src="../script/jwindow.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jcontrol.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jbase64.js" type="text/javascript"></script>
     <script type="text/javascript">
        function DoSearch()
        {
            var vNumber = document.getElementById("txtNumber").value;
             self.frames[1].initializeAddNew(vNumber); 
             
        }
        function DoDelete(vType)
        {
            var vNumber="";
            var vCodeId="" ;
            if(vType=="0")
            {
                vNumber = window.frames['iFrmEdit'].document.getElementById("_hidCodeMId").value;
                if(vNumber!="")
                {
                     if(confirm("是否确定要删除当前选定的信息?")) 
                        PageMethods.DoOperate(vNumber,vCodeId,ClientCallBack);   
                }
                else
                {
                    alert("当前没有您要删除的信息!");
                    return ;
                }
            }
            else
            {
                vCodeId = window.frames['iFrmEdit'].document.getElementById("_hidCodeID").value;
                if(vCodeId!="")
                {
                     if(confirm("是否确定要当前所有的信息?")) 
                        PageMethods.DoOperate(vNumber,vCodeId,ClientCallBack);   
                }
                else
                {
                    alert("当前没有您要删除的信息!");
                    return;
                }
            }
        }
          function ClientCallBack(vResult)
            {
                eval("var resultObj=" + vResult);
                 if(resultObj.resultSign!="-999")
                 {
                     self.frames[1].initializeAddNew(""); 
                    alert("操作成功!"); 
                    return true;
                 }
                 else
                 {
                    alert("服务器忙,请稍候再从新操作!"); 
                    return false;
                 }
            }
        
     </script>
</head>
<body>
    <ccit:ActionForm id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server"></asp:ScriptManager>    
    
        <input type="hidden" id="_hidClassType" runat="server" />
      <table class="tbToolbar" cellpadding="0" cellspacing="0" width="98%" align="center" id="TablePrint">
                <tr>
                    <td align="left">
                        <div class="tbSeparator"></div>
                    </td>
                    <td width="100%" class="titlebar">  
                        文档管理-编号规则设置
                    </td>                
                    <td align="right">
                        <nobr> 
                            编号 <asp:TextBox ID="txtNumber" CssClass="input" runat="server" Width="120"></asp:TextBox>
                            &nbsp;
                            <a  id="lnbAdd" Runat="server" class="linktext"  
                            href="javascript:DoSearch()">
						        <img src="../images/toolbar/search.gif" border="0">查询
					        </a> 
					        <a  id="lndDelete" Runat="server" class="linktext"  
                            href="javascript:DoDelete('0')">
						        <img src="../images/toolbar/del_bq.gif" border="0">删除
					        </a> 
					        <a  id="lndAllDelete" Runat="server" class="linktext"  
                            href="javascript:DoDelete('1')">
						        <img src="../images/toolbar/delete.gif" border="0">删除全部
					        </a> 
                         </nobr>
                    </td> 
                </tr>
      </table>
     <table class="tableborder" cellpadding="0" cellspacing="0" width="98%" height="94.2%" align="center">
        <tr>
            <td width="25%">
                <iframe id="iFrmTree" name="iFrmTree" height="99%" width="98%" scrolling="auto"
						src="" style="BORDER-RIGHT: #000000 1px solid" frameborder="0"></iframe>
            </td>
            <td width="75%">
                <iframe id="iFrmEdit" name="iFrmEdit" height="99%" width="98%" scrolling="yes"
						src="" frameborder="0"></iframe>
            </td>
        </tr>
    </table>
    </form>
    <script type="text/javascript">
    <!--
        $(document).ready(function(){   
            var vClassType = document.getElementById("_hidClassType").value; 
             var oPageParam="classType="+vClassType;
             var oEncodeParam=base64encode(oPageParam); 
            self.frames[0].document.location.href = "SystemDoc_codemanage_tree.aspx?"+oEncodeParam;
            self.frames[1].document.location.href = "SystemDoc_codemanage_view.aspx?"+oEncodeParam;
        });
    //-->
    </script>
    </ccit:ActionForm>
</body>
</html>
